package com.tdtxdcxm.ruralcommunity.slice;

import com.tdtxdcxm.ruralcommunity.ResourceTable;
import com.tdtxdcxm.ruralcommunity.appruntime.DataCenterControl;
import com.tdtxdcxm.ruralcommunity.myutils.MyTools;
import ohos.aafwk.ability.AbilitySlice;
import ohos.aafwk.content.Intent;
import ohos.agp.components.Button;
import ohos.agp.components.Component;
import ohos.agp.components.Text;
import ohos.utils.zson.ZSONObject;

public class XmDetails extends AbilitySlice {
    private String contentid= "";
    private String userid = "";

    private Button xm_detail_topddl_nobut,xm_detail_authorbut,xm_detail_topddl_discussbut,xm_detail_topddl_agreebut,xm_detail_topddl_collectbut;
    private Text xm_detail_authortext,xm_detail_fieldtext,xm_detail_titletext,xm_detail_nodeonetext,xm_detail_nodetwotext,xm_detail_nodethreetext,xm_detail_contenttext;


    private void initDtWzDtASComponents(String listContainerName,int i){
        xm_detail_topddl_nobut = (Button) findComponentById(ResourceTable.Id_xm_detail_topddl_nobut);
        xm_detail_authorbut = (Button) findComponentById(ResourceTable.Id_xm_detail_authorbut);
        xm_detail_topddl_discussbut = (Button) findComponentById(ResourceTable.Id_xm_detail_topddl_discussbut);
        xm_detail_topddl_agreebut = (Button) findComponentById(ResourceTable.Id_xm_detail_topddl_agreebut);
        xm_detail_topddl_collectbut = (Button) findComponentById(ResourceTable.Id_xm_detail_topddl_collectbut);

        xm_detail_authortext = (Text) findComponentById(ResourceTable.Id_xm_detail_authortext);
        xm_detail_fieldtext = (Text) findComponentById(ResourceTable.Id_xm_detail_fieldtext);

        xm_detail_titletext = (Text) findComponentById(ResourceTable.Id_xm_detail_titletext);
        xm_detail_nodeonetext = (Text) findComponentById(ResourceTable.Id_xm_detail_nodeonetext);
        xm_detail_nodetwotext = (Text) findComponentById(ResourceTable.Id_xm_detail_nodetwotext);
        xm_detail_nodethreetext = (Text) findComponentById(ResourceTable.Id_xm_detail_nodethreetext);

        xm_detail_contenttext = (Text) findComponentById(ResourceTable.Id_xm_detail_contenttext);

        switch (listContainerName) {
            case "worlddtlc":
                break;
            case "worldxmlc":
                //不能自己关注自己，不能自己点赞、评论、收藏自己
                if(DataCenterControl.userName.equals(DataCenterControl.worldxm_listcontainer_list.get(i).getUser_id())){
                    xm_detail_authorbut.setVisibility(Component.HIDE);
                    xm_detail_topddl_discussbut.setVisibility(Component.HIDE);
                    xm_detail_topddl_agreebut.setVisibility(Component.HIDE);
                    xm_detail_topddl_collectbut.setVisibility(Component.HIDE);
                }
                else {
                    xm_detail_authorbut.setVisibility(Component.VISIBLE);
                    xm_detail_topddl_discussbut.setVisibility(Component.VISIBLE);
                    xm_detail_topddl_agreebut.setVisibility(Component.VISIBLE);
                    xm_detail_topddl_collectbut.setVisibility(Component.VISIBLE);
                }
                xm_detail_authortext.setText(DataCenterControl.worldxm_listcontainer_list.get(i).getUser_id());
                xm_detail_fieldtext.setText(DataCenterControl.worldxm_listcontainer_list.get(i).getField_id());
                ZSONObject zsonobject_xm = ZSONObject.stringToZSON(DataCenterControl.worldxm_listcontainer_list.get(i).getDetail());
                xm_detail_titletext.setText("项 目 |"+"\t"+zsonobject_xm.getString("title"));
                xm_detail_nodeonetext.setText("节点1|"+"\t"+zsonobject_xm.getString("nodeone"));
                xm_detail_nodetwotext.setText("节点2|"+"\t"+zsonobject_xm.getString("nodetwo"));
                xm_detail_nodethreetext.setText("节点3|"+"\t"+zsonobject_xm.getString("nodethree"));
                xm_detail_contenttext.setText(zsonobject_xm.getString("detail").replace("\\n","\n"));
                contentid = DataCenterControl.worldxm_listcontainer_list.get(i).getContent_id();
                userid = DataCenterControl.worldxm_listcontainer_list.get(i).getUser_id();
                MyTools.UpDataWorldListReadInfo(XmDetails.this,DataCenterControl.worldxm_listcontainer_list.get(i).getContent_id()
                                            ,DataCenterControl.worldxm_listcontainer_list.get(i).getUser_id()
                                            ,xm_detail_authorbut
                                            ,xm_detail_topddl_agreebut
                                            ,xm_detail_topddl_collectbut);
                break;
            case "worldwzlc":
                break;
            case "artlc":
                //不能自己关注自己，不能自己点赞、评论、收藏自己
                if(DataCenterControl.userName.equals(DataCenterControl.art_listcontainer_list.get(i).getUser_id())){
                    xm_detail_authorbut.setVisibility(Component.HIDE);
                    xm_detail_topddl_discussbut.setVisibility(Component.HIDE);
                    xm_detail_topddl_agreebut.setVisibility(Component.HIDE);
                    xm_detail_topddl_collectbut.setVisibility(Component.HIDE);
                }
                else {
                    xm_detail_authorbut.setVisibility(Component.VISIBLE);
                    xm_detail_topddl_discussbut.setVisibility(Component.VISIBLE);
                    xm_detail_topddl_agreebut.setVisibility(Component.VISIBLE);
                    xm_detail_topddl_collectbut.setVisibility(Component.VISIBLE);
                }
                xm_detail_authortext.setText(DataCenterControl.art_listcontainer_list.get(i).getUser_id());
                xm_detail_fieldtext.setText(DataCenterControl.art_listcontainer_list.get(i).getField_id());
                ZSONObject zsonobject_art = ZSONObject.stringToZSON(DataCenterControl.art_listcontainer_list.get(i).getDetail());
                xm_detail_titletext.setText("项 目 |"+"\t"+zsonobject_art.getString("title"));
                xm_detail_nodeonetext.setText("节点1|"+"\t"+zsonobject_art.getString("nodeone"));
                xm_detail_nodetwotext.setText("节点2|"+"\t"+zsonobject_art.getString("nodetwo"));
                xm_detail_nodethreetext.setText("节点3|"+"\t"+zsonobject_art.getString("nodethree"));
                xm_detail_contenttext.setText(zsonobject_art.getString("detail").replace("\\n","\n"));
                contentid = DataCenterControl.art_listcontainer_list.get(i).getContent_id();
                userid = DataCenterControl.art_listcontainer_list.get(i).getUser_id();
                MyTools.UpDataWorldListReadInfo(XmDetails.this,DataCenterControl.art_listcontainer_list.get(i).getContent_id()
                                                ,DataCenterControl.art_listcontainer_list.get(i).getUser_id()
                                                ,xm_detail_authorbut
                                                ,xm_detail_topddl_agreebut
                                                ,xm_detail_topddl_collectbut);
                break;
            case "clothelc":
                //不能自己关注自己，不能自己点赞、评论、收藏自己
                if(DataCenterControl.userName.equals(DataCenterControl.clothe_listcontainer_list.get(i).getUser_id())){
                    xm_detail_authorbut.setVisibility(Component.HIDE);
                    xm_detail_topddl_discussbut.setVisibility(Component.HIDE);
                    xm_detail_topddl_agreebut.setVisibility(Component.HIDE);
                    xm_detail_topddl_collectbut.setVisibility(Component.HIDE);
                }
                else {
                    xm_detail_authorbut.setVisibility(Component.VISIBLE);
                    xm_detail_topddl_discussbut.setVisibility(Component.VISIBLE);
                    xm_detail_topddl_agreebut.setVisibility(Component.VISIBLE);
                    xm_detail_topddl_collectbut.setVisibility(Component.VISIBLE);
                }
                xm_detail_authortext.setText(DataCenterControl.clothe_listcontainer_list.get(i).getUser_id());
                xm_detail_fieldtext.setText(DataCenterControl.clothe_listcontainer_list.get(i).getField_id());
                ZSONObject zsonobject_clothe = ZSONObject.stringToZSON(DataCenterControl.clothe_listcontainer_list.get(i).getDetail());
                xm_detail_titletext.setText("项 目 |"+"\t"+zsonobject_clothe.getString("title"));
                xm_detail_nodeonetext.setText("节点1|"+"\t"+zsonobject_clothe.getString("nodeone"));
                xm_detail_nodetwotext.setText("节点2|"+"\t"+zsonobject_clothe.getString("nodetwo"));
                xm_detail_nodethreetext.setText("节点3|"+"\t"+zsonobject_clothe.getString("nodethree"));
                xm_detail_contenttext.setText(zsonobject_clothe.getString("detail").replace("\\n","\n"));
                contentid = DataCenterControl.clothe_listcontainer_list.get(i).getContent_id();
                userid = DataCenterControl.clothe_listcontainer_list.get(i).getUser_id();
                MyTools.UpDataWorldListReadInfo(XmDetails.this,DataCenterControl.clothe_listcontainer_list.get(i).getContent_id()
                                                ,DataCenterControl.clothe_listcontainer_list.get(i).getUser_id()
                                                ,xm_detail_authorbut
                                                ,xm_detail_topddl_agreebut
                                                ,xm_detail_topddl_collectbut);
                break;
            case "foodlc":
                //不能自己关注自己，不能自己点赞、评论、收藏自己
                if(DataCenterControl.userName.equals(DataCenterControl.food_listcontainer_list.get(i).getUser_id())){
                    xm_detail_authorbut.setVisibility(Component.HIDE);
                    xm_detail_topddl_discussbut.setVisibility(Component.HIDE);
                    xm_detail_topddl_agreebut.setVisibility(Component.HIDE);
                    xm_detail_topddl_collectbut.setVisibility(Component.HIDE);
                }
                else {
                    xm_detail_authorbut.setVisibility(Component.VISIBLE);
                    xm_detail_topddl_discussbut.setVisibility(Component.VISIBLE);
                    xm_detail_topddl_agreebut.setVisibility(Component.VISIBLE);
                    xm_detail_topddl_collectbut.setVisibility(Component.VISIBLE);
                }
                xm_detail_authortext.setText(DataCenterControl.food_listcontainer_list.get(i).getUser_id());
                xm_detail_fieldtext.setText(DataCenterControl.food_listcontainer_list.get(i).getField_id());
                ZSONObject zsonobject_food = ZSONObject.stringToZSON(DataCenterControl.food_listcontainer_list.get(i).getDetail());
                xm_detail_titletext.setText("项 目 |"+"\t"+zsonobject_food.getString("title"));
                xm_detail_nodeonetext.setText("节点1|"+"\t"+zsonobject_food.getString("nodeone"));
                xm_detail_nodetwotext.setText("节点2|"+"\t"+zsonobject_food.getString("nodetwo"));
                xm_detail_nodethreetext.setText("节点3|"+"\t"+zsonobject_food.getString("nodethree"));
                xm_detail_contenttext.setText(zsonobject_food.getString("detail").replace("\\n","\n"));
                contentid = DataCenterControl.food_listcontainer_list.get(i).getContent_id();
                userid = DataCenterControl.food_listcontainer_list.get(i).getUser_id();
                MyTools.UpDataWorldListReadInfo(XmDetails.this,DataCenterControl.food_listcontainer_list.get(i).getContent_id()
                                                ,DataCenterControl.food_listcontainer_list.get(i).getUser_id()
                                                ,xm_detail_authorbut
                                                ,xm_detail_topddl_agreebut
                                                ,xm_detail_topddl_collectbut);
                break;
            case "houselc":
                //不能自己关注自己，不能自己点赞、评论、收藏自己
                if(DataCenterControl.userName.equals(DataCenterControl.house_listcontainer_list.get(i).getUser_id())){
                    xm_detail_authorbut.setVisibility(Component.HIDE);
                    xm_detail_topddl_discussbut.setVisibility(Component.HIDE);
                    xm_detail_topddl_agreebut.setVisibility(Component.HIDE);
                    xm_detail_topddl_collectbut.setVisibility(Component.HIDE);
                }
                else {
                    xm_detail_authorbut.setVisibility(Component.VISIBLE);
                    xm_detail_topddl_discussbut.setVisibility(Component.VISIBLE);
                    xm_detail_topddl_agreebut.setVisibility(Component.VISIBLE);
                    xm_detail_topddl_collectbut.setVisibility(Component.VISIBLE);
                }
                xm_detail_authortext.setText(DataCenterControl.house_listcontainer_list.get(i).getUser_id());
                xm_detail_fieldtext.setText(DataCenterControl.house_listcontainer_list.get(i).getField_id());
                ZSONObject zsonobject_house = ZSONObject.stringToZSON(DataCenterControl.house_listcontainer_list.get(i).getDetail());
                xm_detail_titletext.setText("项 目 |"+"\t"+zsonobject_house.getString("title"));
                xm_detail_nodeonetext.setText("节点1|"+"\t"+zsonobject_house.getString("nodeone"));
                xm_detail_nodetwotext.setText("节点2|"+"\t"+zsonobject_house.getString("nodetwo"));
                xm_detail_nodethreetext.setText("节点3|"+"\t"+zsonobject_house.getString("nodethree"));
                xm_detail_contenttext.setText(zsonobject_house.getString("detail").replace("\\n","\n"));
                contentid = DataCenterControl.house_listcontainer_list.get(i).getContent_id();
                userid = DataCenterControl.house_listcontainer_list.get(i).getUser_id();
                MyTools.UpDataWorldListReadInfo(XmDetails.this,DataCenterControl.house_listcontainer_list.get(i).getContent_id()
                                                ,DataCenterControl.house_listcontainer_list.get(i).getUser_id()
                                                ,xm_detail_authorbut
                                                ,xm_detail_topddl_agreebut
                                                ,xm_detail_topddl_collectbut);
                break;
            case "trafficlc":
                //不能自己关注自己，不能自己点赞、评论、收藏自己
                if(DataCenterControl.userName.equals(DataCenterControl.traffic_listcontainer_list.get(i).getUser_id())){
                    xm_detail_authorbut.setVisibility(Component.HIDE);
                    xm_detail_topddl_discussbut.setVisibility(Component.HIDE);
                    xm_detail_topddl_agreebut.setVisibility(Component.HIDE);
                    xm_detail_topddl_collectbut.setVisibility(Component.HIDE);
                }
                else {
                    xm_detail_authorbut.setVisibility(Component.VISIBLE);
                    xm_detail_topddl_discussbut.setVisibility(Component.VISIBLE);
                    xm_detail_topddl_agreebut.setVisibility(Component.VISIBLE);
                    xm_detail_topddl_collectbut.setVisibility(Component.VISIBLE);
                }
                xm_detail_authortext.setText(DataCenterControl.traffic_listcontainer_list.get(i).getUser_id());
                xm_detail_fieldtext.setText(DataCenterControl.traffic_listcontainer_list.get(i).getField_id());
                ZSONObject zsonobject_traffic = ZSONObject.stringToZSON(DataCenterControl.traffic_listcontainer_list.get(i).getDetail());
                xm_detail_titletext.setText("项 目 |"+"\t"+zsonobject_traffic.getString("title"));
                xm_detail_nodeonetext.setText("节点1|"+"\t"+zsonobject_traffic.getString("nodeone"));
                xm_detail_nodetwotext.setText("节点2|"+"\t"+zsonobject_traffic.getString("nodetwo"));
                xm_detail_nodethreetext.setText("节点3|"+"\t"+zsonobject_traffic.getString("nodethree"));
                xm_detail_contenttext.setText(zsonobject_traffic.getString("detail").replace("\\n","\n"));
                contentid = DataCenterControl.traffic_listcontainer_list.get(i).getContent_id();
                userid = DataCenterControl.traffic_listcontainer_list.get(i).getUser_id();
                MyTools.UpDataWorldListReadInfo(XmDetails.this,DataCenterControl.traffic_listcontainer_list.get(i).getContent_id()
                                                ,DataCenterControl.traffic_listcontainer_list.get(i).getUser_id()
                                                ,xm_detail_authorbut
                                                ,xm_detail_topddl_agreebut
                                                ,xm_detail_topddl_collectbut);
                break;
            case "studylc":
                //不能自己关注自己，不能自己点赞、评论、收藏自己
                if(DataCenterControl.userName.equals(DataCenterControl.study_listcontainer_list.get(i).getUser_id())){
                    xm_detail_authorbut.setVisibility(Component.HIDE);
                    xm_detail_topddl_discussbut.setVisibility(Component.HIDE);
                    xm_detail_topddl_agreebut.setVisibility(Component.HIDE);
                    xm_detail_topddl_collectbut.setVisibility(Component.HIDE);
                }
                else {
                    xm_detail_authorbut.setVisibility(Component.VISIBLE);
                    xm_detail_topddl_discussbut.setVisibility(Component.VISIBLE);
                    xm_detail_topddl_agreebut.setVisibility(Component.VISIBLE);
                    xm_detail_topddl_collectbut.setVisibility(Component.VISIBLE);
                }
                xm_detail_authortext.setText(DataCenterControl.study_listcontainer_list.get(i).getUser_id());
                xm_detail_fieldtext.setText(DataCenterControl.study_listcontainer_list.get(i).getField_id());
                ZSONObject zsonobject_study = ZSONObject.stringToZSON(DataCenterControl.study_listcontainer_list.get(i).getDetail());
                xm_detail_titletext.setText("项 目 |"+"\t"+zsonobject_study.getString("title"));
                xm_detail_nodeonetext.setText("节点1|"+"\t"+zsonobject_study.getString("nodeone"));
                xm_detail_nodetwotext.setText("节点2|"+"\t"+zsonobject_study.getString("nodetwo"));
                xm_detail_nodethreetext.setText("节点3|"+"\t"+zsonobject_study.getString("nodethree"));
                xm_detail_contenttext.setText(zsonobject_study.getString("detail").replace("\\n","\n"));
                contentid = DataCenterControl.study_listcontainer_list.get(i).getContent_id();
                userid = DataCenterControl.study_listcontainer_list.get(i).getUser_id();
                MyTools.UpDataWorldListReadInfo(XmDetails.this,DataCenterControl.study_listcontainer_list.get(i).getContent_id()
                                                ,DataCenterControl.study_listcontainer_list.get(i).getUser_id()
                                                ,xm_detail_authorbut
                                                ,xm_detail_topddl_agreebut
                                                ,xm_detail_topddl_collectbut);
                break;
            case "culturelc":
                //不能自己关注自己，不能自己点赞、评论、收藏自己
                if(DataCenterControl.userName.equals(DataCenterControl.culture_listcontainer_list.get(i).getUser_id())){
                    xm_detail_authorbut.setVisibility(Component.HIDE);
                    xm_detail_topddl_discussbut.setVisibility(Component.HIDE);
                    xm_detail_topddl_agreebut.setVisibility(Component.HIDE);
                    xm_detail_topddl_collectbut.setVisibility(Component.HIDE);
                }
                else {
                    xm_detail_authorbut.setVisibility(Component.VISIBLE);
                    xm_detail_topddl_discussbut.setVisibility(Component.VISIBLE);
                    xm_detail_topddl_agreebut.setVisibility(Component.VISIBLE);
                    xm_detail_topddl_collectbut.setVisibility(Component.VISIBLE);
                }
                xm_detail_authortext.setText(DataCenterControl.culture_listcontainer_list.get(i).getUser_id());
                xm_detail_fieldtext.setText(DataCenterControl.culture_listcontainer_list.get(i).getField_id());
                ZSONObject zsonobject_culture = ZSONObject.stringToZSON(DataCenterControl.culture_listcontainer_list.get(i).getDetail());
                xm_detail_titletext.setText("项 目 |"+"\t"+zsonobject_culture.getString("title"));
                xm_detail_nodeonetext.setText("节点1|"+"\t"+zsonobject_culture.getString("nodeone"));
                xm_detail_nodetwotext.setText("节点2|"+"\t"+zsonobject_culture.getString("nodetwo"));
                xm_detail_nodethreetext.setText("节点3|"+"\t"+zsonobject_culture.getString("nodethree"));
                xm_detail_contenttext.setText(zsonobject_culture.getString("detail").replace("\\n","\n"));
                contentid = DataCenterControl.culture_listcontainer_list.get(i).getContent_id();
                userid = DataCenterControl.culture_listcontainer_list.get(i).getUser_id();
                MyTools.UpDataWorldListReadInfo(XmDetails.this,DataCenterControl.culture_listcontainer_list.get(i).getContent_id()
                                                ,DataCenterControl.culture_listcontainer_list.get(i).getUser_id()
                                                ,xm_detail_authorbut
                                                ,xm_detail_topddl_agreebut
                                                ,xm_detail_topddl_collectbut);
                break;
            case "userdtlc":
                break;
            case "userxmlc":
                //不能自己关注自己，不能自己点赞、评论、收藏自己
                if(DataCenterControl.userName.equals(DataCenterControl.userxm_listcontainer_list.get(i).getUser_id())){
                    xm_detail_authorbut.setVisibility(Component.HIDE);
                    xm_detail_topddl_discussbut.setVisibility(Component.HIDE);
                    xm_detail_topddl_agreebut.setVisibility(Component.HIDE);
                    xm_detail_topddl_collectbut.setVisibility(Component.HIDE);
                }
                else {
                    xm_detail_authorbut.setVisibility(Component.VISIBLE);
                    xm_detail_topddl_discussbut.setVisibility(Component.VISIBLE);
                    xm_detail_topddl_agreebut.setVisibility(Component.VISIBLE);
                    xm_detail_topddl_collectbut.setVisibility(Component.VISIBLE);
                }
                xm_detail_authortext.setText(DataCenterControl.userxm_listcontainer_list.get(i).getUser_id());
                xm_detail_fieldtext.setText(DataCenterControl.userxm_listcontainer_list.get(i).getField_id());
                ZSONObject zsonobject_userxm = ZSONObject.stringToZSON(DataCenterControl.userxm_listcontainer_list.get(i).getDetail());
                xm_detail_titletext.setText("项 目 |"+"\t"+zsonobject_userxm.getString("title"));
                xm_detail_nodeonetext.setText("节点1|"+"\t"+zsonobject_userxm.getString("nodeone"));
                xm_detail_nodetwotext.setText("节点2|"+"\t"+zsonobject_userxm.getString("nodetwo"));
                xm_detail_nodethreetext.setText("节点3|"+"\t"+zsonobject_userxm.getString("nodethree"));
                xm_detail_contenttext.setText(zsonobject_userxm.getString("detail").replace("\\n","\n"));
                contentid = DataCenterControl.userxm_listcontainer_list.get(i).getContent_id();
                userid = DataCenterControl.userxm_listcontainer_list.get(i).getUser_id();
                MyTools.UpDataWorldListReadInfo(XmDetails.this,DataCenterControl.userxm_listcontainer_list.get(i).getContent_id()
                                                ,DataCenterControl.userxm_listcontainer_list.get(i).getUser_id()
                                                ,xm_detail_authorbut
                                                ,xm_detail_topddl_agreebut
                                                ,xm_detail_topddl_collectbut);
                break;
            case "userwzlc":
                break;
            case "usercollectlc":
                //不能自己关注自己，不能自己点赞、评论、收藏自己
                if(DataCenterControl.userName.equals(DataCenterControl.usercollect_listcontainer_list.get(i).getUser_id())){
                    xm_detail_authorbut.setVisibility(Component.HIDE);
                    xm_detail_topddl_discussbut.setVisibility(Component.HIDE);
                    xm_detail_topddl_agreebut.setVisibility(Component.HIDE);
                    xm_detail_topddl_collectbut.setVisibility(Component.HIDE);
                }
                else {
                    xm_detail_authorbut.setVisibility(Component.VISIBLE);
                    xm_detail_topddl_discussbut.setVisibility(Component.VISIBLE);
                    xm_detail_topddl_agreebut.setVisibility(Component.VISIBLE);
                    xm_detail_topddl_collectbut.setVisibility(Component.VISIBLE);
                }
                xm_detail_authortext.setText(DataCenterControl.usercollect_listcontainer_list.get(i).getUser_id());
                xm_detail_fieldtext.setText(DataCenterControl.usercollect_listcontainer_list.get(i).getField_id());
                ZSONObject zsonobject_usercollect = ZSONObject.stringToZSON(DataCenterControl.usercollect_listcontainer_list.get(i).getDetail());
                xm_detail_titletext.setText("项 目 |"+"\t"+zsonobject_usercollect.getString("title"));
                xm_detail_nodeonetext.setText("节点1|"+"\t"+zsonobject_usercollect.getString("nodeone"));
                xm_detail_nodetwotext.setText("节点2|"+"\t"+zsonobject_usercollect.getString("nodetwo"));
                xm_detail_nodethreetext.setText("节点3|"+"\t"+zsonobject_usercollect.getString("nodethree"));
                xm_detail_contenttext.setText(zsonobject_usercollect.getString("detail").replace("\\n","\n"));
                contentid = DataCenterControl.usercollect_listcontainer_list.get(i).getContent_id();
                userid = DataCenterControl.usercollect_listcontainer_list.get(i).getUser_id();
                MyTools.UpDataWorldListReadInfo(XmDetails.this,DataCenterControl.usercollect_listcontainer_list.get(i).getContent_id()
                                                ,DataCenterControl.usercollect_listcontainer_list.get(i).getUser_id()
                                                ,xm_detail_authorbut
                                                ,xm_detail_topddl_agreebut
                                                ,xm_detail_topddl_collectbut);
                break;
            default:
                break;
        }

        xm_detail_authorbut.setClickedListener(new Component.ClickedListener() {
            @Override
            public void onClick(Component component) {
                if(xm_detail_authorbut.getText().equals("关注")){
                    MyTools.UpDataFollowInfo(XmDetails.this,xm_detail_authorbut,userid,-2,"关注");
                }
                else if(xm_detail_authorbut.getText().equals("已关注")){
                    MyTools.UpDataFollowInfo(XmDetails.this,xm_detail_authorbut,userid,-2,"取消关注");
                }
            }
        });
        xm_detail_topddl_nobut.setClickedListener(new Component.ClickedListener() {
            @Override
            public void onClick(Component component) {
                xm_detail_authorbut.setText("加载中...");
                xm_detail_topddl_agreebut.setText("加载中...");
                xm_detail_topddl_collectbut.setText("加载中...");

                xm_detail_authorbut.setVisibility(Component.VISIBLE);
                xm_detail_topddl_discussbut.setVisibility(Component.VISIBLE);
                xm_detail_topddl_agreebut.setVisibility(Component.VISIBLE);
                xm_detail_topddl_collectbut.setVisibility(Component.VISIBLE);
                terminate();
            }
        });
        xm_detail_topddl_discussbut.setClickedListener(new Component.ClickedListener() {
            @Override
            public void onClick(Component component) {
                present(new ContentDiscussSlice(),new Intent().setParam("contentid",contentid));
            }
        });
        xm_detail_topddl_agreebut.setClickedListener(new Component.ClickedListener() {
            @Override
            public void onClick(Component component) {
                if(xm_detail_topddl_agreebut.getText().equals("点赞")){
                    MyTools.UpDataAgreeAndCollectInfo(XmDetails.this,contentid,"点赞",xm_detail_topddl_agreebut);
                    return;
                }
                if(xm_detail_topddl_agreebut.getText().equals("已点赞")){
                    MyTools.UpDataAgreeAndCollectInfo(XmDetails.this,contentid,"取消点赞",xm_detail_topddl_agreebut);
                    return;
                }
            }
        });
        xm_detail_topddl_collectbut.setClickedListener(new Component.ClickedListener() {
            @Override
            public void onClick(Component component) {
                if(xm_detail_topddl_collectbut.getText().equals("收藏")){
                    MyTools.UpDataAgreeAndCollectInfo(XmDetails.this,contentid,"收藏",xm_detail_topddl_collectbut);
                    return;
                }
                if(xm_detail_topddl_collectbut.getText().equals("已收藏")){
                    MyTools.UpDataAgreeAndCollectInfo(XmDetails.this,contentid,"取消收藏",xm_detail_topddl_collectbut);
                    return;
                }
            }
        });
    }

    @Override
    protected void onStart(Intent intent) {
        super.onStart(intent);
        super.setUIContent(ResourceTable.Layout_xm_details);

        initDtWzDtASComponents(intent.getStringParam("listContainerName"),intent.getIntParam("i",-1));
    }

    @Override
    protected void onActive() {
        super.onActive();
    }

    @Override
    protected void onInactive() {
        super.onInactive();
    }

    @Override
    protected void onForeground(Intent intent) {
        super.onForeground(intent);
    }

    @Override
    protected void onBackground() {
        super.onBackground();
    }

    @Override
    protected void onStop() {
        super.onStop();
    }
}
